package com.heima.apis.article;

import com.heima.apis.article.fallback.IAriticleClientFallback;
import com.heima.model.article.dto.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description: test
 * @Create by: JJ菜菜
 * @Date: 2022/1/16 20:09
 */

// 远程接口指向降级代码
@FeignClient(value = "leadnews-article", fallback = IAriticleClientFallback.class)
public interface IArticleClient {

    @PostMapping("/api/v1/article/save")
    public ResponseResult saveArticle(@RequestBody ArticleDto dto);

}
